home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // DlgDemo5.h
- //
- //***********************************************************************
-
- typedef struct tagPROPERTIES
- {
- int nFillType;
- int nFillColor;
- CString text;
- int nHeight;
- BOOL bBold;
- BOOL bItalic;
- } PROPERTIES, * PPROPERTIES;
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CSettingsDialog : public CDialog
- {
- public:
- int m_nFillType;
- int m_nFillColor;
- CString m_text;
- int m_nHeight;
- BOOL m_bBold;
- BOOL m_bItalic;
-
- protected:
- virtual void OnOK ();
- virtual void OnCancel ();
- virtual void DoDataExchange (CDataExchange*);
- virtual void PostNcDestroy ();
-
- afx_msg void OnDefaults ();
- DECLARE_MESSAGE_MAP ()
- };
-
- class CMainWindow : public CFrameWnd
- {
- friend void CSettingsDialog::PostNcDestroy ();
-
- private:
- int m_nFillType;
- int m_nFillColor;
- CString m_text;
- int m_nHeight;
- BOOL m_bBold;
- BOOL m_bItalic;
-
- CSettingsDialog* m_pDlg;
-
- void DoSolidFill (CDC*, CRect*);
- void DoGradientFill (CDC*, CRect*);
- void DoDrawText (CDC*, CRect*);
-
- public:
- CMainWindow ();
-
- protected:
- afx_msg BOOL OnEraseBkgnd (CDC*);
- afx_msg void OnPaint ();
- afx_msg void OnOptionsSettings ();
- afx_msg void OnOptionsExit ();
- afx_msg void OnOptionsAbout ();
- afx_msg LONG OnApplySettings (UINT, LONG);
-
- DECLARE_MESSAGE_MAP ()
- };
-
- class CAboutDialog : public CDialog
- {
- private:
- CRect m_rect;
-
- public:
- CAboutDialog (CWnd* pParentWnd = NULL) :
- CDialog (IDD_ABOUTDLG, pParentWnd) {}
-
- virtual BOOL OnInitDialog ();
-
- protected:
- afx_msg void OnPaint ();
- DECLARE_MESSAGE_MAP ()
- };
-